package com.rc.saas.tenant.vo.order;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.rc.saas.tenant.common.utils.StringUtil;
import java.math.BigDecimal;
import java.util.Date;

public class ExportOrderDiscountRecordVo{

    @ExcelProperty(value = "优惠单号",index = 0)
    private String discountNum;

    @ExcelProperty(value = "优惠金额",index = 1)
    private BigDecimal discountAmount;

    // 折扣类型(优惠券、优惠方案、优惠折扣等。详情见userlevelconstant常量类)
    //折扣类型 0整单满减优惠券 1服务费满减优惠卷 2充电满折 3服务器满折 4代金券 5.生日免单 6.生日礼遇减免 7.会员优惠 8.权益金 9.企业优惠
    @ExcelProperty(value = "折扣类型",index = 2)
    private String discountType;

    @ExcelProperty(value = "优惠来源",index = 3)
    private String discountSource;

    //@ExcelProperty(value = "创建时间")
    //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    //private Date createdTime;

    @ExcelProperty(value = "充电订单号",index = 4)
    private String orderNum;

    //交易流水号
    @ExcelIgnore
    private String outOrderNum;//outOrderNum

    @ExcelProperty(value = "支付时间",index = 5)
    @DateTimeFormat(value = "yyyy-MM-dd HH:mm:ss")
    private Date occupyPayTime;


    @ExcelProperty(value = "所属加盟商",index = 6)
    private String operatorName;

    @ExcelProperty(value = "站点名称",index = 7)
    private String stationName;

    @ExcelProperty(value = "充电枪编号",index = 8)
    private String gunNo;

    @ExcelProperty(value = "余额",index = 9)
    private BigDecimal account;


    public String getDiscountSource() {
        if (StringUtil.isNotBlank(discountSource)) {
            if ("0".equals(discountSource)) {
                return "平台";
            } else if ("1".equals(discountSource)) {
                return "运营商";
            }
        }
        return "";
    }

    public String getDiscountType() {
        if (StringUtil.isNotBlank(discountType)) {
            if ("0".equals(discountType)) {
                return "整单满减优惠券";
            } else if ("1".equals(discountType)) {
                return "服务费满减优惠卷";
            } else if ("2".equals(discountType)) {
                return "充电满折";
            } else if ("3".equals(discountType)) {
                return "服务器满折";
            } else if ("4".equals(discountType)) {
                return "代金券";
            } else if ("5".equals(discountType)) {
                return "生日免单";
            } else if ("6".equals(discountType)) {
                return "生日礼遇减免";
            } else if ("7".equals(discountType)) {
                return "会员优惠";
            } else if ("8".equals(discountType)) {
                return "权益金";
            } else if ("9".equals(discountType)) {
                return "企业优惠";
            } else if ("10".equals(discountType)) {
                return "活动满减";
            }
        }
        return "";
    }

    public String getDiscountNum() {
        return discountNum;
    }

    public void setDiscountNum(String discountNum) {
        this.discountNum = discountNum;
    }

    public BigDecimal getDiscountAmount() {
        return discountAmount;
    }

    public void setDiscountAmount(BigDecimal discountAmount) {
        this.discountAmount = discountAmount;
    }

    public void setDiscountType(String discountType) {
        this.discountType = discountType;
    }

    public void setDiscountSource(String discountSource) {
        this.discountSource = discountSource;
    }

    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }

    public Date getOccupyPayTime() {
        return occupyPayTime;
    }

    public void setOccupyPayTime(Date occupyPayTime) {
        this.occupyPayTime = occupyPayTime;
    }

    public String getOperatorName() {
        return operatorName;
    }

    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }

    public String getStationName() {
        return stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public String getGunNo() {
        return gunNo;
    }

    public void setGunNo(String gunNo) {
        this.gunNo = gunNo;
    }

    public BigDecimal getAccount() {
        return account;
    }

    public void setAccount(BigDecimal account) {
        this.account = account;
    }
}
